<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <script type="text/javascript" src="flowplayer-3.2.4.min.js"></script>

    <!-- some minimal styling, can be removed -->
    <link rel="stylesheet" type="text/css" href="style.css">

    <!-- page title -->
    <title>Minimal Flowplayer setup</title>
</head>
<body>
<?php
/**
 * Created by PhpStorm.
 * User: ZhangYi
 * Date: 2010-12-9
 * Time: 15:28:23
 * To change this template use File | Settings | File Templates.
 */


if ($_FILES["file"]["error"] > 0) {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("upload/" . $_FILES["file"]["name"])) {
        echo $_FILES["file"]["name"] . " already exists. ";
    }
    else
    {
        move_uploaded_file($_FILES["file"]["tmp_name"],
                "upload/" . $_FILES["file"]["name"]);
        echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
    }


    ?>
    <div id="page">

        <h1>Minimal Flowplayer setup</h1>

        <p>View commented source code to get familiar with Flowplayer installation.</p>

        <!-- this A tag is where your Flowplayer will be placed. it can be anywhere -->
        <a
                href="<?php echo "upload/" . $_FILES["file"]["name"] ?>"
                style="display:block;width:520px;height:330px"
                id="player">
        </a>

        <!-- this will install flowplayer inside previous A- tag. -->
        <script>
            flowplayer("player", "flowplayer-3.2.5.swf");
        </script>


        <!--
            after this line is purely informational stuff.
            does not affect on Flowplayer functionality
        -->

        <p>
            If you are running these examples <strong>locally</strong> and not on some webserver you must edit your
            <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html">
                Flash security settings</a>.
        </p>

        <p class="less">
            Select "Edit locations" &gt; "Add location" &gt; "Browse for files" and select
            flowplayer-x.x.x.swf you just downloaded.
        </p>


        <h2>Documentation</h2>

        <p>
            <a href="http://flowplayer.org/documentation/installation/index.html">Flowplayer installation</a>
        </p>

        <p>
            <a href="http://flowplayer.org/documentation/configuration/index.html">Flowplayer configuration</a>
        </p>

        <p>
            See this identical page on <a href="http://flowplayer.org/demos/example/index.htm">Flowplayer website</a>
        </p>

    </div>
    <?php

}
?>


</body>
</html>